Add rule to encourage non-mutable property initialization#662
Closed
knocte wants to merge 13 commits intofsprojects:masterfrom
Closed
Add rule to encourage non-mutable property initialization#662knocte wants to merge 13 commits intofsprojects:masterfrom
knocte wants to merge 13 commits intofsprojects:masterfrom
Conversation
Added failing test for FavourNonMutablePropertyInitialization rule for case when property assignent is not the last statement.
Fix FavourNonMutablePropertyInitialization rule for cases when threre are statements after property assignment.
c522018 to
691e258
Compare
Added failing test for FavourNonMutablePropertyInitialization rule for case when mutable variable is assigned (false positive).
Fix false positive in FavourNonMutablePropertyInitialization when local variable is assigned and not object property.
Use property initialization instead of property mutation as suggested by FavourNonMutablePropertyInitialization rule.
Added failing test for FavourNonMutablePropertyInitialization rule for case when several properties are assigned.
Fix in FavourNonMutablePropertyInitialization rule for case when several properties are assigned.
Added failing tests for FavourNonMutablePropertyInitialization rule for different constructs that may contain instance creation with subsequent property initialization.
Rewrite FavourNonMutablePropertyInitialization rule code so that more cases are covered and not only code in modules and functions.
Use property initialization instead of property mutation as suggested by FavourNonMutablePropertyInitialization rule.
2009317 to
e16875e
Compare
Collaborator
Author
|
Superseded by #683 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #590
Fixes #535